package com.ai.demo.controller;

/**
 * AUTHER: wangyue
 * TIME  : 2025/4/17 : 10:58
 */
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class AIController {

    @Autowired
    private ChatModel chatClient;

    @GetMapping("/ask")
    public String ask(@RequestParam String question) {
        return chatClient.call(question);
    }
}